package hzau.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import hzau.pojo.question.Question;
import hzau.pojo.question.SelectionQuestion;
import hzau.pojo.requestParams.PaperParam;
import hzau.pojo.requestParams.SelectionQuestionParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Paper implements Serializable {
    @TableId(type= IdType.AUTO)
    Long id;
    Long courseId;
    Short state;
    String advice;
    Integer selectionNum;
    Integer judgeNum;
    Integer gapFillingNum;
    Integer shortAnswerNum;
    Integer essayNum;
    String masterAdvice;
    Long reviewId;
    Long createId;
    String name;
    String lastAlterTime;
    Byte expired;
    Integer startYear;
    Short type;
    String url;
    @TableField(exist = false)
    Double similarity;
   public Paper(PaperParam param){
       this.courseId= param.getCourseId();
       this.advice=param.getAdvice();
       this.state=param.getState();
       this.essayNum=param.getEssayNum();
       this.selectionNum=param.getSelectionNum();
       this.gapFillingNum=param.getShortAnswerNum();
       this.judgeNum=param.getJudgeNum();
       this.shortAnswerNum=param.getShortAnswerNum();
       this.masterAdvice= param.getMasterAdvice();
       this.reviewId=param.getReviewId();
       this.createId=param.getCreateId();
       this.name=param.getName();
       this.startYear= param.getStartYear();
       this.type=param.getType();
       this.url=param.getUrl();
   }
   public void setParam(PaperParam param){
       this.courseId= param.getCourseId();
       this.advice=param.getAdvice();
       this.state=param.getState();
       this.essayNum=param.getEssayNum();
       this.selectionNum=param.getSelectionNum();
       this.gapFillingNum=param.getShortAnswerNum();
       this.judgeNum=param.getJudgeNum();
       this.shortAnswerNum=param.getShortAnswerNum();
       this.masterAdvice= param.getMasterAdvice();
       this.reviewId=param.getReviewId();
       this.createId=param.getCreateId();
       this.name=param.getName();
       this.startYear= param.getStartYear();
       this.type=param.getType();
       this.url=param.getUrl();
   }
}
